﻿using DONGZHOU.Core.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DONGZHOU.Project.Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.Load += Form1_Load;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
         
        }

        private void Form1_Load_1(object sender, EventArgs e)
        {
            ImportDefinitionHelp.Instance.Init("Extends");
            if (ImportDefinitionHelp.Instance.ModuleDefinitionImporters == null)
            {
                return;
            }
            foreach (PluginBase pluginBase in ImportDefinitionHelp.Instance.ModuleDefinitionImporters)
            {
                List<ImportModel> importModels = pluginBase.GetImportModels();
                foreach (ImportModel importModel in importModels)
                {
                    TabPage tabPage = new TabPage() { Text = importModel.Header };
                    tabPage.Controls.Add(importModel.View as Control);
                    tabControl1.TabPages.Add(tabPage);
                }

            }
        }
    }
}
